package spring.boot.client.dispatcher;

import io.netty.channel.ChannelHandlerContext;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;


@Async
@Component
public class MessageDispatcherRun {

    /**
     * 异步执行方法
     */
    public void asyncRun(MessageHandler messageHandler, ChannelHandlerContext ctx, Message message) {
        messageHandler.execute(ctx.channel(), message);
    }

}
